package com.peaksport.pkms.base.entity;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.Table;

import com.peaksport.framework.base.entity.CoreBaseEntity;
import com.peaksport.framework.base.venum.BaseIntConverter;
import com.peaksport.framework.uuid.PKEntityType;
import com.peaksport.pkms.base.venum.KFMsgTypeEnum;

import lombok.Getter;
import lombok.Setter;


@SuppressWarnings("serial")
@Entity
@Table(name="CT_KF_ConsumeMsg")
@Getter
@Setter
public class KFConsumeMsgEntity extends CoreBaseEntity {
	
	@Column(name="FTopic")
	private String topic;
	@Column(name="FGroupId")
	private String groupId;
	@Convert(converter = BaseIntConverter.class)
	@Column(name="FType")
	private KFMsgTypeEnum type;
	@Column(name="FMsgId")
	private String msgId;
	@Lob 
	@Basic(fetch = FetchType.LAZY) 
	@Column(name = "FMsgBody")
	private String msgBody;
	@Column(name="FStartTime")
	private Date startTime;
	@Column(name="FEndTime")
	private Date endTime;
	@Column(name="FisConsumed")
	private boolean isConsumed;

	@Override
	public PKEntityType getEntityType() {
		return PKEntityType.create("5D0D8DAE");
	}

}
